{% extends "WebMainSiteBundle:Course:layout.html.twig" %}
{% set title = "所有章节" %}
{% block title %}
    {{ title }}
{% endblock %}

{% block user_main %}
    <!-- blog comments -->
    <section class="comments">
        <h2 class="yahei">课程章节列表</h2>
        <hr/>
        <ul class="media-list">
            <li class="media">
                <div class="media-body">
                {% for row in courseLessonArrange %}
                    <div class="media" style="padding-left: {{ row.level * 3 }}0px">
                        <div class="media-body">
                            <div class="media-heading">
                                <strong>{{ row.title }}</strong>
                                <a href="{{ path("WebCourseLessonContentAdd",{uniqueId:course.uniqueId}) }}?arrange={{ row.id }}" class="pull-right btn btn-dark"><i class="fa fa-plus"></i> 添加课时到章节</a>
                                <a href="{{ path("WebCourseLessonArrangeAdd",{uniqueId:course.uniqueId}) }}?id={{ row.id }}" class="pull-right btn btn-green" style="margin-right: 5px;"><i class="fa fa-cogs"></i> 编辑</a>
                            </div>
                            <p>{{ row.info |slice(0,80) }}</p>
                        </div>
                    </div>
                    <hr/>
                {% endfor %}
                </div>
            </li>
        </ul>
        <hr class="invisible" />
    </section>
    {#{% for row in courseLessonArrange %}#}
        {#<p>#}
            {#<a>{{ row.name }}</a> |#}
            {#<a>标题：{{ row.title }}</a> |#}
            {#<a>简介：{{ row.info }}</a> |#}
            {#<a href="{{ path("WebCourseLessonArrangeAdd",{uniqueId:course.uniqueId}) }}?id={{ row.id }}">编辑</a>#}
            {#<a href="{{ path("WebCourseLessonContentAdd",{uniqueId:course.uniqueId}) }}?arrange={{ row.id }}">添加课时到章节</a>#}
        {#</p>#}
    {#{% endfor %}#}

    {#{{ dump(course) }}#}
    {#{{ dump(courseLessonArrange) }}#}
{% endblock %}